import request from '@/config/axios'

export interface VehicleMgrVO {
  id: number
  vehicleNo: string
  isIdentified: number
  vehicleType: number
  owner: string
  usage: string
  vin: string
  totalQuality: string
  ratedLoad: string
  unladenMass: string
  registrationDate: Date
  issueDate: Date
}

// 查询车辆管理列表
export const getVehicleMgrPage = async (params: VehicleMgrPageReqVO) => {
  return await request.get({ url: `/queue/vehicle-mgr/page`, params })
}

// 查询车辆管理详情
export const getVehicleMgr = async (id: number) => {
  return await request.get({ url: `/queue/vehicle-mgr/get?id=` + id })
}

// 新增车辆管理
export const createVehicleMgr = async (data: VehicleMgrVO) => {
  return await request.post({ url: `/queue/vehicle-mgr/create`, data })
}

// 修改车辆管理
export const updateVehicleMgr = async (data: VehicleMgrVO) => {
  return await request.put({ url: `/queue/vehicle-mgr/update`, data })
}

// 删除车辆管理
export const deleteVehicleMgr = async (id: number) => {
  return await request.delete({ url: `/queue/vehicle-mgr/delete?id=` + id })
}

// 导出车辆管理 Excel
export const exportVehicleMgr = async (params) => {
  return await request.download({ url: `/queue/vehicle-mgr/export-excel`, params })
}
// 获取司机列表
export const getDriverMgrList = async (ids) => {
  return await request.get({ url: `/queue/driver-vehicle/driver-list?vehicleNo=${ids}` })
}
